"""jishe URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path
from .views import IndustryListView, InstituteListView, MajorListView, ClassesListView, InstituteMajorListView, \
    MajorClassesListView, ClassesStudentListView, InstituteStudentListView, StudentsListView, Students2StudentsListView, \
    Classes2StudentsListView, StudentsRelDetailView, Industrys2StudentListView

urlpatterns = [
    path('industrys/', IndustryListView.as_view()),
    path('institute/', InstituteListView.as_view()),
    path('major/', MajorListView.as_view()),
    path('classes/', ClassesListView.as_view()),

    path('students/', StudentsListView.as_view()),

    path('institute_major/', InstituteMajorListView.as_view()),
    path('major_classes/', MajorClassesListView.as_view()),

    path('classes_student/', ClassesStudentListView.as_view()),
    path('industrys_student/', InstituteStudentListView.as_view()),

    # 以学生为主的查询
    path('students_to_students/', Students2StudentsListView.as_view()),
    # 求一个同学的二度关系
    path('students_rel/<slug:students_id>/', StudentsRelDetailView.as_view()),

    # 以班级为主体的查询
    path('class_to_students/', Classes2StudentsListView.as_view()),

    # 以行业为主体的查询
    path('industrys_to_students/', Industrys2StudentListView.as_view())
]
